package com.xie.mapper;

import com.xie.pojo.Role;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface RoleMapper extends Mapper<Role> {

    @Select("select * from role where id in( select roleId from user_role where userId=#{userId})")
    List<Role> findRoleByUserId(Long userId);
}
